28/11/2017

Overview of the Presentation

1. Introduction to Data Visualization

2. Introduction to ggplot

3. Overview of the Gapminder Dataset

4. Exploration of GDP Per Capita

5. Exploration of Life Expectancy

6. Extention libraries to ggplot2

Role of Data Visualization

Data Visualization tools

Introduction to ggplot2

1. ggplot2 is a data visualization package for the statistical programming language R.

2. Created by Hadley Wickham in 2005

3. Implementation of Leland Wilkinson's Grammar of Graphics

4. Easy plotting with qplot function

5. Complex plotting with ggplot function

6. ggplot for python

Why ggplot2?

1. Free and open source

2. Professional quality graphs

3. Literate programming

4. Easy superposition (Multiple Plots in a graph)

5. Multiple themes + ggthemes

6. Large number of extention libraries

More reasons why you should use ggplo2: https://github.com/tidyverse/ggplot2/wiki/Why-use-ggplot2

Gapminder DatasFrame

country continent year lifeExp pop gdpPercap
Canada Americas 1952 68.75 14785584 11367.16
Canada Americas 1957 69.96 17010154 12489.95
Canada Americas 1962 71.30 18985849 13462.49
Canada Americas 1967 72.13 20819767 16076.59
Canada Americas 1972 72.88 22284500 18970.57
Canada Americas 1977 74.21 23796400 22090.88
Canada Americas 1982 75.76 25201900 22898.79
Canada Americas 1987 76.86 26549700 26626.52

Sample dataframe from 1704 records of the Gapminder dataset.

Now to Visualize Gapminder

GDP Per Capita in 1987 - Boxplot

GDP Per Capita in 1987 - Boxplot + Jitter Plot

Geographical plotting of GDP Per Capita in 1952

Geographical plotting of GDP Per Capita in 2007

Polar Plot of The World Map

Contributions to Continent GDP in 2007 - Stacked Bar Plot

Life Expectancy in 1987 - Violin Plot

Life Expectancy in 1987 - Violin Plot + Jitter Plot

Life Expectancy Trend in Continents

African Life Expectancy in 1952 & 2007

Change in Life Expectance in Africa - Bar Plot

Life Expectancy for Selected Countries

Americas Life Expectancy in 1952 & 2007

Increase in Life Expectance in Americas - Polar Bar Plot

GDP Per Capita Vs Life Expectancy in 2007

GDP Per Capita Vs Life Expectancy across years

Relationship between GDP Per Capita & Life Expectancy

Spatial Data - ggmap

Directed Graphs - igraph

Network Graphs - ggnetowrk

Network Graphs - ggnet2

References